package com.cn.filter;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.List;
import java.util.Set;

/**
 * description: 过滤放行的urls,不会进行身份验证 <br>
 * date: 23.5.25 14:52 <br>
 * author: cn_yaojin <br>
 * version: 1.0 <br>
 */
@Setter
@Getter
@Accessors(chain = true)
@Configuration
@ConfigurationProperties(prefix = "urls.exclude")
public class UrlsFilterExcludeConfig {

    /**
     * 需要进行身份认证的urls
     */
    private String[] urls;

    /**
     * 排除不进行TOKEN认证的url
     *
     * <pre>
     *                         "/admin/login/**",
     *                         "/admin/file/**",
     *                         "/openbase/**",
     *                         "/error",
     *                         "/openid/**",
     *                         "/favicon.ico",
     *                         "/v2/api-docs",
     *                         "/swagger-resources",
     *                         "/webjars/**",
     *                         "/doc.html/**"
     *  </pre>
     */
    private List<String> excludeUrls;

    /**
     * 门户端url前缀
     */
    private Set<String> portalUrlsPrefix;


}
